package day01;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;


/**
 * @author feng
 * @Date 2021/10/17 7:05
 */
public class collectionTest {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        c.add(10);
        c.add(20);
        c.add(30);
        System.out.println(c);

        Iterator iterator = c.iterator();
        while (iterator.hasNext()){
            int next = (int) iterator.next();
            System.out.println(next);
        }


    }
}
